home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-27 | 994 b | 30 lines | [TEXT/GEOL] |
- Item 5716110 26-April-90 20:21PDT
-
- From: D0532 Aidea Systems, Don Park,PRT
-
- To: CPLUS.DEV$ C++ Interest List--Developers
- CPLUS.APPLE$ C++ Interest List--Apple Employees
-
- Sub: Re: Value parameter..
-
- I think what Derek pointed out might be a bug in CFront translator. The CFront
- translator inserts following code into the copy constructor.
-
- this-> __vptr= (struct __mptr *)TShape::__ptbl;
-
- This code initializes the virtual table pointer of the instance, but rather
- than initializing by COPYING, it stuffs TShape::__ptbl which is a global static
- array of virtual function pointers.
-
- It makes you wonder why the CFront doesn't simply copy the __vptr from the
- TShape being copied?
-
- i.e. this->__vptr = (struct __mptr *)s->__vptr;
-
- where s is from TShape::TShape ( const TShape & s );
-
- This should work the way Derek White originally thought.
-
- Don Park
-
-